<%@ taglib prefix="spring-tags" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="spring-form" uri="http://www.springframework.org/tags/form"%>
<%@ page
    import="java.util.Iterator"
    import="org.jiscinvolve.astrodabis.barberry.control.Paths"
    import="org.jiscinvolve.astrodabis.barberry.control.RequestData"
    import="org.jiscinvolve.astrodabis.barberry.common.core.Job"
    import="org.jiscinvolve.astrodabis.barberry.common.core.Tag"
    import="org.jiscinvolve.astrodabis.barberry.common.core.Account"
    session="true"
%><%
RequestData data = (RequestData) request.getAttribute(
    RequestData.MODEL_ATTRIB
    ) ;
Account actor = data.actor();
%>
<html>
    <head>
	    <title>AstroDAbis</title>
        <link href='<%= data.file("css/page.css") %>' rel='stylesheet' type='text/css'/>
    </head>
    <body>
        <%@ include file="/jsp/header.jsp" %>
        <div class='body'>
            <div class='left'>
                <%@ include file="/jsp/menu.jsp" %>
            </div>
            <div class='right'>
            </div>
            <div class='content'>
        	    <h2>AstroDAbis</h2>

                <fieldset>
                    <legend>Latest tags</legend>
                    <table>
                    <%
                    for (Tag tag : data.womble().tags().recent(5))
                        {
                        %>
                        <tr>
                            <td>
                                <a href="<%= data.link(tag) %>"><%= tag.owner().name() %>:<%= tag.name() %></a>
                            </td>
                            <td>
                                <%= tag.text() %>
                            </td>
                        </tr>
                        <%
                        }
                    %>
                    </table>
                </fieldset>

                <fieldset>
                    <legend>Latest jobs</legend>
                    <table>
                    <%
                    for (Job job : data.womble().jobs().recent(5))
                        {
                        %>
                        <tr>
                            <td>
                                <a href="<%= data.link(job) %>"><%= job.owner().name() %>:<%= job.name() %></a>
                            </td>
                            <td>
                                <%= job.text() %>
                            </td>
                        </tr>
                        <%
                        }
                    %>
                    </table>
                </fieldset>
    
            </div>
        </div>
        <%@ include file="/jsp/footer.jsp" %>
    </body>
</html>

